import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-09-08
 * Time:8:33
 */
public class Money {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        double[] arr=new double[5];
        double sum=0;
        int i=0;
        sc.hasNextDouble()
        System.out.println("请输入会员本月的消费记录");
        while(true) {
            System.out.printf("请输入第" + (i += 1) + "笔购物金额：");
            arr[i - 1] = sc.nextDouble();
            if (i == arr.length) {
                break;
            }
           // System.out.printf("\n");//换行
        }
        System.out.println("序号"+"\t\t\t\t"+"金额（元）");
        for(i = 0 ; i < arr.length ; i++){
            System.out.println((i+1)+"\t\t\t\t"+arr[i]);
            sum+=arr[i];
        }
        System.out.println("总金额"+"\t\t\t"+sum);
    }
}
